package com.yanfan.zutai.controller;

import com.yanfan.common.annotation.Log;
import com.yanfan.common.core.controller.BaseController;
import com.yanfan.common.core.domain.AjaxResult;
import com.yanfan.common.enums.BusinessType;
import com.yanfan.common.utils.poi.ExcelUtil;
import com.yanfan.zutai.aop.SysQueryData;
import com.yanfan.zutai.domain.BDeviceZtBind;
import com.yanfan.zutai.service.IBDeviceZtBindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 云组态组件关联Controller
 *
 * @author ruoyi
 * @date 2022-05-23
 */
@RestController
@RequestMapping("/zutai/bDeviceZtBind")
public class BDeviceZtBindController extends BaseController {
    @Autowired
    private IBDeviceZtBindService bDeviceZtBindService;

    /**
     * 导出云组态组件关联列表
     */
    @Log(title = "云组态组件关联", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    @SysQueryData
    public AjaxResult export(BDeviceZtBind bDeviceZtBind) {
        List<BDeviceZtBind> list = bDeviceZtBindService.selectBDeviceZtBindList(bDeviceZtBind);
        ExcelUtil<BDeviceZtBind> util = new ExcelUtil<BDeviceZtBind>(BDeviceZtBind.class);
        return util.exportExcel(list, "bDeviceZtBind");
    }

}
